# -*- coding: utf-8 -*-
# @Time    : 2019/11/20 15:36
# @Author  : Jinwei
# @File    : test.py
import unittest,time,os
from test_logic.test_logic import Testlogic
from tools.log import LOG
from config.config import *
from appium import webdriver
from tools.save_result import save_result
from tools.read_xlsx import read_xlsx
from time import strftime
from HTMLTestRunner import HTMLTestRunner


class TestKj():

    def __init__(self):
        # 启动设备
        self.driver = webdriver.Remote(SERVRE, desired_caps)
        # 因应用需要时间加载，此处需设置等待时间
        self.driver.implicitly_wait(5)
        LOG.info("程序开始启动")

    def work(self):
        test_result = Testlogic(driver=self.driver)
        Test1 = test_result.Testcas()
        print(Test1)
        # result = "SUCCESS" if test_result == data_test else "FAIL"
        # save_result(result)

if __name__ == '__main__':
    TestKj().work()